<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 鼠标经过li添加背景色和更换字体颜色 */
        a {
            display: block;
            text-decoration: none;
        }

        li:hover a {
            background: red;
            color: #fff;
        }

        li {
            /*去除小圆点 */
            list-style: none;
            text-align: center;
            display: inline-block;
            width: 30%;
        }

        ul {
            /* 内边距 */
            padding: 0;
        }
    </style>
</head>

<body>
    <ul>
        <li>
            <a href="">首页</a>
        </li>

        <li>
            <a href="">手机</a>
        </li>
        <li>
            <a href="">电脑</a>
        </li>
    </ul>
</body>

</html>